package com.studentmanage.manage_college.controller;

import com.studentmanage.api.college.SpecializeControllerApi;
import com.studentmanage.framework.domain.base.Specialize;
import com.studentmanage.framework.domain.common.response.ResponseResult;
import com.studentmanage.framework.domain.common.response.ResponseValue;
import com.studentmanage.manage_college.service.SpecializeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/specialize")
public class SpecializeController implements SpecializeControllerApi {
    @Autowired
    private SpecializeService specializeService;

    @Override
    @PostMapping("/add")
    public ResponseResult addSpecialize(@RequestBody Specialize specialize) {
        return specializeService.addSpecialize(specialize);
    }

    @Override
    @GetMapping("/get/{id}")
    public ResponseValue<Specialize> findSpecializeById(@PathVariable("id") String id) {
        return specializeService.findSpecializeById(id);
    }
}
